package lyp;

import java.util.Scanner;

public class Demo6 {
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int sum=0;
		int[] num=new int[10];
		int[] sum1=new int[10];
		for (int i = 0; i < num.length; i++) {
			System.out.println("输入第"+(i+1)+"件商品的价格：");
			int price=sc.nextInt();
			num[i]=price;
			sum+=price;
			sum1[i]=sum;
		}
		for (int i = 0; i < num.length; i++) {
			System.out.println("第"+(i+1)+"件商品价格："+num[i]+"  "+"应付总价："+sum1[i]);
		}
	}
}